2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCER_COMPONENTDOCUMENT_JUCEHEADER__
27 #define __JUCER_COMPONENTDOCUMENT_JUCEHEADER__
29 #include "../jucer_JucerDocument.h"
32 //==============================================================================
35 class ComponentDocument
: public JucerDocument
38 //==============================================================================
42 //==============================================================================
43 const String
getTypeName() const;
45 JucerDocument
* createCopy();
46 Component
* createTestComponent (const bool alwaysFillBackground
);
48 int getNumPaintRoutines() const { return 1; }
49 const StringArray
getPaintRoutineNames() const { return StringArray ("Graphics"); }
50 PaintRoutine
* getPaintRoutine (const int index
) const { return index
== 0 ? backgroundGraphics
: 0; }
52 ComponentLayout
* getComponentLayout() const { return components
; }
54 //==============================================================================
55 XmlElement
* createXml() const;
56 bool loadFromXml (const XmlElement
& xml
);
58 void fillInGeneratedCode (GeneratedCode
& code
) const;
61 //==============================================================================
62 ComponentLayout
* components
;
63 PaintRoutine
* backgroundGraphics
;
67 #endif // __JUCER_COMPONENTDOCUMENT_JUCEHEADER__